/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Network;

import Graph.GraphData;
import Graph.GraphViewer;
import data.TableData;
import perspectives.Viewer;
import perspectives.ViewerFactory;

/**
 *
 * @author mokoe001
 */
public class NetworkViewerFactory extends ViewerFactory{
    
    
     @Override
       public ViewerFactory.RequiredData requiredData() {
		
		ViewerFactory.RequiredData rd = new ViewerFactory.RequiredData("TableData","1");
		return rd;
	}
     
    
   
  @Override
	public String creatorType() {
		// TODO Auto-generated method stub
		return "Network Viewer";
	}
  
  @Override
	public Viewer create(String name) {
		// TODO Auto-generated method stub
		if (this.isAllDataPresent()){
			return new NetworkViewer(name, (TableData) this.getData().get(0));
                }
		return null;
	}
    
    
}
